﻿@model S4Store.Models.Markting.YDMTModel
@{
    Layout = null;
    ViewBag.Title = "YDMT";

    S4Store.Models.Chart.Column ChartModel = new S4Store.Models.Chart.Column();
    ChartModel.Name = "移动媒体集客效果KPI概况";
    ChartModel.YAxis = "比率(%)";
    ChartModel.XAxis.Add("媒体资金投入率");
    ChartModel.XAxis.Add("传播效果变化度");
    
    ChartModel.Colors = new List<string> { S4Store.Models.Chart.Color.Target, S4Store.Models.Chart.Color.Actual };
    
    S4Store.Models.Chart.ChartSeries series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "目标";
    series1.Data.Add(100);
    series1.Data.Add(Model.Report.NetMarketingStandard.GZDBHLV);
    ChartModel.Serieses.Add(series1);
    
    S4Store.Models.Chart.ChartSeries series2 = new S4Store.Models.Chart.ChartSeries();
    series2.Name = "实际";
    series2.Data.Add(Model.Report.ZJTRB);
    series2.Data.Add(Model.Report.GZDBHLV);
    ChartModel.Serieses.Add(series2);
    
    
    List<S4Store.Models.Chart.RedGreenIndex> RedGreenIndexs = new List<S4Store.Models.Chart.RedGreenIndex>();
    S4Store.Models.Chart.RedGreenIndex index1 = new S4Store.Models.Chart.RedGreenIndex();
    index1.Size = S4Store.Models.Chart.RedGreenIndex.IndexSize.Big;
    if (Model.Report.ZJTRB >= 100)
    {
        index1.Type = S4Store.Models.Chart.RedGreenIndex.IndexType.Green;   
    }else{
        index1.Type = S4Store.Models.Chart.RedGreenIndex.IndexType.Red;   
    }
    index1.Value = (Model.Report.ZJTRB - 100).toInt()+"%";
    index1.Url = Url.Action("YDXJB");
    index1.Title = "媒体资金投入率差值";
    index1.Tip = "移动媒体投入概况";
    RedGreenIndexs.Add(index1);
    
    S4Store.Models.Chart.RedGreenIndex index2 = new S4Store.Models.Chart.RedGreenIndex();
    index2.Size = S4Store.Models.Chart.RedGreenIndex.IndexSize.Big;
    if (Model.Report.GZDBHLV >= Model.Report.NetMarketingStandard.GZDBHLV)
    {
        index2.Type = S4Store.Models.Chart.RedGreenIndex.IndexType.Green;
    }
    else
    {
        index2.Type = S4Store.Models.Chart.RedGreenIndex.IndexType.Red;
    }
    index2.Value = (Model.Report.GZDBHLV - Model.Report.NetMarketingStandard.GZDBHLV).toInt() + "%";
    index2.Url = Url.Action("YDJKXG");
    index2.Title = "传播效果变化与标准值的差值";
    index2.Tip = "移动媒体集客效果KPI";
    RedGreenIndexs.Add(index2);


}
<div style="height:100%; overflow:auto">
@Html.Action("ReportBar", "Common", Model.BarModel)
<div style="position:relative; width:100%">
        @Html.Partial("../Chart/Column", ChartModel)
        @Html.Partial("../Chart/RedGreenIndex", RedGreenIndexs)
</div>
</div>


